package com.aijk.commons.scan;

import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Arrays;

/**
 * Created by iscdw on 2016/4/10.
 */
public class ScanResult implements Serializable {

    /**
     * 类名
     */
    private Class<?> clazz;

    /**
     * 入参类型
     */
    private Class<?>[] parameterTypes;

    /**
     * 处理方法的请求参数名称
     */
    private String[] parameterNames = null;
    /**
     * 出差类型
     */
    private Class<?> returnType;

    /**
     * 对象方法
     */
    private Method method;

    /**
     * 实例对象
     */
    private Object obj;

    /**
     * 标识
     */
    private String key;

    @Override
    public String toString() {
        return "ScanResult{" +
                "clazz=" + clazz +
                ", parameterTypes=" + Arrays.toString(parameterTypes) +
                ", parameterNames=" + Arrays.toString(parameterNames) +
                ", returnType=" + returnType +
                ", method=" + method +
                ", obj=" + obj +
                ", key='" + key + '\'' +
                '}';
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Class<?> getClazz() {
        return clazz;
    }

    public void setClazz(Class<?> clazz) {
        this.clazz = clazz;
    }

    public Class<?>[] getParameterTypes() {
        return parameterTypes;
    }

    public void setParameterTypes(Class<?>[] parameterTypes) {
        this.parameterTypes = parameterTypes;
    }

    public Class<?> getReturnType() {
        return returnType;
    }

    public void setReturnType(Class<?> returnType) {
        this.returnType = returnType;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }

    public String[] getParameterNames() {
        return parameterNames;
    }

    public void setParameterNames(String[] parameterNames) {
        this.parameterNames = parameterNames;
    }


}
